A Pretty-Printer for Every Occasion
نویسندگان
چکیده
Tool builders dealing with many different languages, and language designers require sophisticated pretty-print techniques to minimize the time needed for constructing and adapting pretty-printers. We combined new and existing pretty-print techniques in a generic pretty-printer that satisfies modern pretty-print requirements. Its features include language independence, customization, and incremental pretty-printer generation. Furthermore, we emphasize that the recent acceptance of XML as international standard for the representation of structured data demands flexible pretty-print techniques, and we demonstrate that our pretty-printer provides
منابع مشابه
Strictly Pretty
Pretty printers are tools for formatting structured text. A recently taken algebraic approach has lead to a systematic design of pretty printers. Wadler has proposed such an algebraic pretty printer together with an implementation for the lazy functional language Haskell. The original design causes exponential complexity when literally used in a strict language. This note recalls some propertie...
متن کاملFliPpr: A Prettier Invertible Printing System
When implementing a programming language, we often write a parser and a pretty-printer. However, manually writing both programs is not only tedious but also error-prone; it may happen that a prettyprinted result is not correctly parsed. In this paper, we propose FliPpr, which is a program transformation system that uses program inversion to produce a CFG parser from a pretty-printer. This novel...
متن کاملHow to Pretty-Print a Long Formula
We propose a structured rendering for higher-order logic (HOL) to make specifications more readable. Furthermore, we present a freely-available parser and pretty-printer that implements these ideas, which we call BeautifHOL. We conclude by describing possible extensions to our proposal and motivate the need for formatting standards for formal specifications, generally.
متن کاملPretty-Printing within the ASF+SDF Meta-Environment: a Generic Approach
The automatic generation of formatters for (programming) languages within the ASF+SDF Meta-Environment is a research topic that is concerned with the construction of language specific formatters (or pretty-printers) given a language definition in SDF. In this paper, we give an overview of pretty-printers that have been developed within this project and observe that these pretty-printers are eit...
متن کاملFunctional Pearl: Replaying the stack for parsing and pretty printing
Modulo inessential details, parsers and pretty printers, to and from algebraic datatypes, offer an uncanny resemblance and yet are all too often defined separately, in gross violation of the “don’t repeat yourself” principle. We present a family of reversible parser/printer combinators that allows one to define both at once in a type-safe manner, compositionally and without any need for a prepr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2000